package org.cpar.compiler.nodes;

import org.antlr.runtime.Token;
import org.antlr.runtime.tree.Tree;
import org.cpar.compiler.CPARNode;
import org.cpar.compiler.ICodeWriter;

public class ForAllStatement extends CPARNode {

	public void accept(ICodeWriter writer) {
		writer.visit(this);
	}

	private ForAllStatement(ForAllStatement forAll) {
		super(forAll);
	}

	public ForAllStatement(Token nextToken) {
		super(nextToken);
	}

	public CPARNode getAssignmentExpr() {
		return (CPARNode) getChild(0);
	}
	
	public CPARNode getToExpression() {
		return (CPARNode) getChild(1);
	}
	
	public CPARNode getBody() {
		return (CPARNode) getChild(2);
	}
	
	@Override
	public Tree dupNode() {
		return new ForAllStatement(this);
	}

}
